﻿using System;
using System.Collections.Generic;
using System.Text;
using EasyCommerce.DAL;

namespace EasyCommerce.BLL
{
    public class CartItem : IComparable<CartItem>
    {
        private Product _item;
        public Product Item
        {
            get { return this._item; }
            set { this._item = value; }
        }

        private int _unit;
        public int Unit
        {
            get { return this._unit; }
            set { this._unit = value; }
        }

        #region IComparable<CartItem> Members

        public int CompareTo(CartItem other)
        {
            if (this.Item.Id == other.Item.Id)
                return 0;
            else
                return 1;
        }

        #endregion
    }
}
